#include "PacketHandler.h"

PacketHandler* PacketHandler::mInstance = new PacketHandler();

PacketHandler* PacketHandler::getInstance()
{
	assert( mInstance );
	return mInstance;
}

void PacketHandler::stop()
{

	Log->success("PacketHandler stopped");
	delete Pck;

}

PacketHandler::PacketHandler()
{

}

PacketHandler::~PacketHandler()
{
	
	Log->success("~PacketHandler");

}

void PacketHandler::HandleTelnetMessage(char* buff, TelnetMessage* message)
{

	

}

void PacketHandler::HandlePacketHeader(char* buff, PacketHeader* header)
{

	memcpy((void*)&header->Opcode,buff,sizeof(header->Opcode));
	memcpy((void*)&header->Length,buff+sizeof(header->Opcode),sizeof(header->Length));

}